<style type="text/css">
    .left-panel {
        float: left;
        width: 75%;
    }
    
    .right-panel {
        float: right;
        width: 20%;
        padding-left: 40px;
    }
</style>

<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/nicedit/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('description');
});

bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('short_intro');
});
</script>
<script type="text/javascript">
 
</script>

<form name="create_form" id="create_form" method="POST" action="?r=game/create" enctype="multipart/form-data">
    <div class="left-panel">
        <h3>Thông tin cơ bản</h3><hr />
        <table border="0">
            <tr>
                <td><label for="normal">Tên Game</label></td>
                <td><label for="normal">Trang chu</label></td>
            </tr>
            <tr>
                <td><input name="name" id="name"  type="text" size="70" style="width:329px"></td>
                <td><input type="text" value="http://" name="homepage" id="homepage" style="width:329px"></td>
            </tr>
        </table>
        
        <table border="0">
            <tr>
                <td>
                    <label for="normal" style="width:240px">Thể loại</label>
                    <select name="category_id" id="category_id" style="opacity: 0;">
                        <?
                            foreach($pagevals['selection_label']['category'] as $key=> $value){
                                echo '<option class="selection_label" value="'.$key.'">'.ucfirst($value).'</option>';
                            }
                        ?>
                    </select>
                </td>
                <td>
                    <label for="normal" style="width:240px">Trạng thái</label>
                    <select name="status" id="status" style="opacity: 0;">
                        <option value="pending" selected="selected">Pending</option>
                        <option value="approved">Approved</option>
                        <option value="active">Active</option>
                        <option value="blocked">Blocked</option>
                    </select>
                </td>
                <td> 
                    <label for="normal" styl>Game Hot?</label>
                    <select name="hot_status" id="hot_status" style="opacity: 0;">
                        <option value="0">No</option>
                        <option value="1" selected="selected">Yes</option> 
                    </select>
                </td>
            </tr>
        </table>
        <br />
        <label for="normal">Giới thiệu</label>
        <textarea  id="short_intro" name="short_intro" rows="3" style="width: 98%"></textarea>
        <label for="normal">Mô tả chi tiết</label>
        <textarea  id="description" name="description" rows="12" style="width: 98%"></textarea>
        <br />
        <table border="0">
            <tr>
                <td width="300"> 
                    <label for="normal">Icon</label>
                    <input name="icon" id="icon" value="" type="file" size="20" style="opacity: 0;">
                    <input type ="hidden" name="icon" id="icon_url"/>
                </td>
                <td>
                    <label for="normal">Hình đại diện</label>
                    <input name="thumb" id="thumb" type="file"  size="20" style="opacity: 0;">
                    <input type ="hidden" name="thumb" id="thumb_url"/>
                </td>
                
            </tr>
            <tr>
                <td>     
                    <div><img id="icon_content" src="" style="width:200px;height:200px;margin-top:15px "></img></div>
                    <div id="icon_status"></div>
                </td>
                <td>
                    <div><img id="thumb_content" src="" style="width:200px;height:200px;margin-top:15px"></img></div>
                    <div id="thumb_status"></div>
                </td>
            </tr>
        </table>
        <br />
        <label for="normal">Screenshots</label>
         <input name="screenshot" id="screenshot" class="screenshot" type="file"  size="20" style="opacity: 0;">
         <input type="hidden" name="screenshots" id="screenshots_url" type="text" value=''/>
         <table>
             <tr>
                 <td id="screenshots_content" align="center"></td>
             </tr>
         </table>
         <span style="clear:left"></span>
         <br />
         <label>Tags</label>
         <input name="tags" id="tag" type="text" size="70">
         
         <label>Thời gian phát hành</label>
         <input name="release_time" id="release_time" type="text" size="70">
         <br /><br />
         <center>
         <button class="btn" id="create_game" href="#"><span class="icon16 icomoon-icon-cog"></span> Create new game</button>
         <button class="btn" id="cancel" href="?r=game"><span class="icon16 icomoon-icon-cog"></span> Cancel</button>
         </center>
    </div>
    
    
    <div class="right-panel">
        <h3>Thông tin liên quan </h3><hr />
        <label for="normal">Nền tảng</label>
        <select name="platform" id="platform" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['platform'] as$key=> $value){

                    //if($key == 0) echo '<option selected="selected" class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                     echo '<option class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select>
        <br /><br /> 
        <input type="text" name="new_platform" value="" style="width:182px" placeholder="Nền tảng"/>
        <br /><br /> 
     
        <label for="normal">Bối cảnh</label>
        <select name="context" id="context" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['context'] as$key=> $value){
                    //if($key == 0) echo '<option selected="selected" class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                     echo '<option class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select>
        <br /><br /> 
        <input type="text" name="new_context" value="" style="width:182px" placeholder="Bối cảnh"/>
        <br /><br />
       
        <label for="normal">Đồ họa</label>
        <select name="graphic_type" id="graphic_type" style="opacity: 0;">
            <option value="2D" selected="selected">2D</option>
            <option value="3D">3D</option>
        </select><br /><br />
        <label for="normal">Màn hình</label>
        <select name="screen_style" id="screen_style" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['screen_style'] as $key=> $value){
                    //if($key == 0) echo '<option selected="selected" class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                   echo '<option class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select><br /><br />
      
        <label for="normal">Bình chọn</label>
        <select name="vote" id="vote" style="opacity: 0;">
            <option value="5" selected="selected">5</option>
            <option value="4">4</option>
            <option value="3">3</option>
            <option value="2">2</option>
            <option value="1">1</option>
        </select><br /><br />
        <label for="normal">Nhà phát hành</label>
        <select name="provider_id" id="provider" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['provider'] as $key=> $value){
                    echo '<option class="selection_label" value="'.$key.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select><br /><br />
      
        <label for="normal">Nhà phát triển</label>
        <select name="developer_id" id="developer_id" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['developer'] as $key=> $value){
                    echo '<option class="selection_label" value="'.$key.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select><br /><br />
        
        <label for="normal">Phiên bản</label>
        <select name="release_type" id="release_type" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['release_type'] as $key=> $value){
                    //if($key == 0) echo '<option selected="selected" class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                   echo '<option class="selection_label" value="'.$value.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select>
        <br /><br /> 
        <input type="text" name="new_release_type" value="" style="width:182px" placeholder="Phiên bản"/>
        <br /><br />
       
    </div>
    <span style="clear: both"></span>
</form>
